package com.hoshino.momochi.util;

import javax.servlet.http.HttpSession;
import java.util.HashSet;
import java.util.Set;

public class TestSessionSet {

    private static final Set<String> client = new HashSet<>();

    // session.getId() return String
    public static void addUser(String sessionId) {
        client.add(sessionId);
    }

    public static void removeUser(String sessionId) {
        client.remove(sessionId);
    }

    public static int getOnlineNumber() {
        return client.size();
    }
}
